package com.jxc.EL;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/course")
public class CourseServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        Course cr = new Course();
        cr.setId("1");
        cr.setName("javaWeb开发");
        cr.setCategory("javaWeb");
        req.setAttribute("course",cr);
        req.getRequestDispatcher("/course.jsp").forward(req,resp);
    }
}
